Component({
  /**
   * Component properties
   */
  properties: {
    index: { type: Number, value: 0 },
  },

  /**
   * Component initial data [private]
   */
  data: {},

  /**
   * lifecycle of component
   */
  lifetimes: {
    attached() {},
  },

  /**
   * Component methods
   */
  methods: {
    toDetail() {
      wx.navigateTo({
        url: `/mall/search/search?index=${this.data.index}`,
      })
    },
  },
})
